package com.teocom.vet;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.PrimaryKeyJoinColumn;

@Entity
@PrimaryKeyJoinColumn(name="doc")
public class Owner extends Person{
	
	@OneToMany(targetEntity=Pet.class)
	private List<Pet> pets;
	
	public Owner() {
		
	}

	public Owner(Integer doc, String firstName, String lastName, List<Pet> pets) {
		super(doc, firstName, lastName);
		this.pets = pets;
	}

	public List<Pet> getPets() {
		return pets;
	}

	public void setPets(List<Pet> pets) {
		this.pets = pets;
	}
}
